export default {
  methods: {
    useApiResponse(data) {
      const keys = Object.keys(data);
      keys.forEach((key) => {
        const handler = this.INCOMPATIBLE_FIELD?.[key];
        if (handler) {
          data[key] = handler[0](data[key]);
        }
      });
      return data;
    },
    useApiRequest(data) {
      const keys = Object.keys(data);
      keys.forEach((key) => {
        const handler = this.INCOMPATIBLE_FIELD?.[key];
        if (handler) {
          data[key] = handler[1](data[key]);
        }
      });
      return data;
    },
  },
};
